/*
 * @Description:
 * @Version: 2.0
 * @Autor: wiz
 * @Date: 2023-10-17 10:30:10
 * @LastEditors: wiz
 * @LastEditTime: 2023-12-22 10:43:46
 */
import { ifs } from '@/services';
import { N_oBaseGrid, N_oInteraction, N_oSetupPanel } from '@/types';
import Vue from 'vue';
/*
prop
regCustEventName //定制事件 不通过标准功能名来接收事件

*/
export namespace N_oBasePanel {
  export interface oBasePanel extends Vue {
    isMask: boolean;
    useTable: boolean;

    config: any;

    needSave: boolean;

    randomTabName: string;

    loading: boolean;

    isExpand: boolean;

    isOpenPrint: boolean;

    selectedPrintTemp: string;

    isPanelSingle: boolean;

    name: {
      formName: string | null;
      tableNames: string[];
    };

    funName: {
      formName: string | null;
      tableNames: string[];
    };

    forms: Array<any>;

    tables: Array<any>;

    tablesLength: number;

    toolbar: any;

    hasRequestAudit: boolean;

    tagsControl: any;

    formID: any;

    isLoadEditLock: boolean;

    searchControl: {
      split: number;
      isSearchOpen: boolean;
      isSearchBoxOpen: boolean;
      isSearchFullOpen: boolean;
      pageNo: number;
      total: number;
      tagsControl: {
        audit: false;
      };
      name: {
        formName: string | null;
        tableNames: string[];
      };
      funName: {
        formName: string | null;
        tableNames: string[];
      };
      G_compName: string;
      GT_compBoxInfo: ifs.I_compBoxInfo;
      GT_compBox: ifs.I_compBox;
      G_compID: string;
      formData: object; // 表头的数据
      currentTableIndex: string;
    };
    interactionCf: N_oInteraction.I_conf;
    regCustEventName: Array<N_oBaseGrid.I_regCustEventName>;
    actionsCfg: any;
    pageNo: number;

    customPermission: any;

    customBtnStatus: any[];

    initFilter: ifs.I_fv[];

    handleListener: (msg: any) => void;
    requestFilter(cfg: any);
    handleRequstFilter(cfg: any);
    // 监听搜索结果表事件
    handleSearchResultChange(data: any);
    // 选择了简易搜索的条件
    selectSimpleSearchField(table: string, field: string, val: boolean);
    // 重置高级搜索的条件
    resetSearchForm();
    setActions(config: any);
    closeSearch();
    openSearch();
    openSearchBox();
    commitEvent(event, params?: any);
    requestAudit();
    requestSendAudit(params);
    requestSendSelect(data, params);
    auditStatus();
    selbillClick(index: number);
    queryLinkClick(index: number, row?: any);
    handleAttachClicked();
    openUploadFile(value: any);
    auditCheck(value: boolean);
    updAuditState(s: 'audit' | 'unAudit');
    delete();
    dialogDel();
    switchEdit(value: boolean);
    doPrint();
    loadData();
    print();
    receiveBaseFormDataPkg(e);
    receiveBaseGridDataPkg(e);
    setTabelM2o(data: any);
    loadTableData();
    doSearchResHandle();
    doNotSearchResHandle(res: ifs.I_queryResData<any>): Promise<Object>;
    loadFormData(pageNo?: number, filter?: ifs.I_fv[]): Promise<Object>;
    updateAuditStatus(row: any);
    getRecordIndexById(id: string);
    insert();
    validate();
    doActions(action: string, params: any);
    save();
    doSave(): Promise<boolean>;
    beforeDelete();
    doDelete();
    updateSaveBtnStatus();
    getBeforeSaveData();
    getAfterSaveData();
    getBeforeDeleteData();
    getAfterDeleteData();
    doCustomBtnAction(title: string, action: string, params?: any);
    prev();
    next();
    jumpTo(to: number);
    end();
    start();
    cleanSubCompData: (
      p: N_oSetupPanel.N_comps.T_eventCoordinationToolbar
    ) => void;
    addTabFunc(funName: string);
    getFunId(): string;
    getFormData(): any;
  }
}
